home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
UTIL
/
MEMORY
/
OLD
/
MEM208SRC
/
FSLib
/
c
/
command
< prev
next >
Wrap
Text File
|
1993-08-22
|
706b
|
31 lines
/* Original code (c) Acorn Computers Ltd, 1992-3 */
#include "FS.h"
/*{{{ */ _kernel_oserror *fs_command(char *arg_string,int argc,int cmd_no,void *privw) /*command processor*/
{
#define buf_Len 256
static char buf[ buf_Len ];
char *temptr = buf;
char *argv[20];
int c=1,f=0;
argc = argc;
privw = privw;
for ( ; temptr - buf < buf_Len && *arg_string >= ' ' ; )
{ if (f)
{
if (*arg_string==' ')
*temptr++=0,arg_string++,f=0;
else
*temptr++ = *arg_string++;
}
else
{ if (*arg_string==' ')
arg_string++;
else
argv[c++]=temptr,*temptr++=*arg_string++,f=1;
} }
*temptr = '\0';
return DoCommand( cmd_no, argc, argv );
}